home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Ahoy 1985 January
/
Ahoy_Magazine_85-01_1985_Double_L.d64
/
music tutor
(
.txt
)
< prev
next >
Wrap
Commodore BASIC
|
2022-10-26
|
8KB
|
215 lines
5 print"[147] please wait":v=53248
10 dima(21),b(21):pokev+32,15:pokev+33,11
20 kb$="gabcdefgabcdefgabcdef"
30 forx=12288to12928step64:fory=0to62:reada:pokex+y,a:nexty,x
40 forx=1to21:reada,b:a(x)=a:b(x)=b:next
50 poke2040,192:poke2041,193:poke2045,197:poke2047,199
60 pokev+37,2:pokev+38,1:pokev+39,0:pokev+40,0:pokev+44,1:pokev+46,1
70 pokev,50:pokev+1,138:pokev+2,58:pokev+3,190
80 pokev+10,177:pokev+11,98:pokev+14,172:pokev+15,74
90 pokev,50:pokev+1,138:pokev+2,58:pokev+3,190:pokev+23,128
95 goto900
100 forx=1to2:print"[154][145][180][165][146] [221] [146] [146] [221] [146] [146] [146] [221][153] [146] [146] [221] [146] [146] [146] ";
105 print"[221] [146] [146] [221] ":next
110 forx=1to2:print"[145][154][217] [221][160][221][160][221][160][221][160][221][160][221][160][221][160][221][160][221][153][160][221][160][221][160][221] [221][160][221][160][221][160][221][160][221][160][221][160][221][160]":next
115 print:print:print""
120 print"[153] [176]";:forx=1to30:print"[192]";:next:print"[178]";:print"[174]"
125 fory=1to4:print" [171]";:forx=1to30:print"[192]";:next:print"[219]";:print"[179]":next
130 print" [221]";:forx=1to15:print" ";:next
135 print"[195][195][195]";:forx=1to12:print" ";:next:print"[221]";:print"[221]":print"[154]";
140 fory=1to4:print" [171]";:forx=1to30:print"[192]";:next:print"[219]";:print"[179]":next
145 print" [173]";:forx=1to30:print"[192]";:next:print"[177]";:print"[189]"
150 ifg=1then1000
160 poke2042,194:poke2043,194:poke2044,196:poke2046,198
170 pokev+4,84:pokev+5,143:pokev+6,84:pokev+7,191:pokev+12,165:pokev+13,108
175 pokev+28,64
180 pokev+41,0:pokev+42,0:pokev+43,7:pokev+45,7
190 gosub4200:pokev+29,79:pokev+23,207:pokev+21,151
200 a=int(rnd(1)*l1)+l2:ifa=1thenni=1.5:goto210
205 ni=a
210 ifg>=3thenprint"[144]"tab(ni*2-3)"^"
220 ifg<=3thenpokev+9,222-4*a
230 pokev+8,169:pokev+21,159
240 a$=mid$(kb$,a,1)
250 getn$:ifg=3andn$=""goto250
260 ifn$="[133]"orn$="[134]"orn$="[135]"thengosub4200
265 ifn$="[136]"thenpokev+21,0:goto900
270 ifn$="h"thengosub4000:goto250
275 ong-1goto500,280,700
280 ifasc(n$)<65orasc(n$)>72then250
290 ifn$=a$thengosub4500:goto400
300 gosub4600:goto250
400 print""tab(ni*2-3)" "
410 pokev+21,143:goto200
500 ifnp=50thennp=19:print"[144]"tab(np)"^":pn=np
510 gosub3000:iffr<>16then600
520 ifjv<>4andjv<>8then250
530 ifjv=8thennp=np+2:ifnp=2thennp=1
540 ifnp=41thennp=39:goto250
550 ifjv=4thennp=np-2:ifnp=-1thennp=0
560 ifnp=-2thennp=0:goto250
570 print""tab(pn)" "
580 print"[144]"tab(np)"^":pn=np
590 goto250
600 n=int(np/2+2):ifnp=0thenn=1
620 ifn=athengosub4500:goto410
630 gosub4600:goto250
700 ifnp=50thenpokev+9,178:np=11
710 gosub3000:iffr<>16then770
720 ifjv<>1andjv<>2then250
730 ifjv=1thennp=np+1:ifnp=22thennp=21:goto250
740 ifjv=2thennp=np-1:ifnp=0thennp=1:goto250
750 pokev+9,222-4*np:goto710
770 ifnp=athengosub4500:goto400
780 gosub4600:goto250
900 print"[147][159] music tutor"
910 print" 1 note primer"
915 print" 2 keyboard search"
920 print" 3 name the note"
925 print" 4 pin the note on the staff"
930 np=50:l1=0
935 print" press choice"
940 geta$:ifa$=""then940
945 g=val(a$)
950 ifg<1org>4then940
955 onggoto960,965,970,975
960 print"[147] note primer":print:print:pokev+21,128:goto100
965 print"[147] keyboard search":print:print:pokev+21,128:goto100
970 print"[147] name the note":print:print:pokev+21,128:goto100
975 print"[147] pin the note on the staff":print:print:pokev+21,128:goto100
1000 rem note primer
1010 poke2042,195:poke2043,200:poke2044,196:poke2046,202
1020 pokev+23,131:pokev+29,3:pokev+28,0
1030 pokev+4,170:pokev+5,200:pokev+6,186:pokev+7,180
1040 pokev+8,170:pokev+9,219:pokev+12,227:pokev+13,139
1050 pokev+41,0:pokev+42,0:pokev+43,7:pokev+45,0
1055 gosub4250
1060 print"[158] music is written on a set of lines"
1065 print" and spaces known as a staff[146]."
1070 gosub4300:print" the basic staffs are the"
1075 print" [153]treble[146] clef[146],[158]";
1080 forx=1to3:pokev+21,129:fory=1to500:next:pokev+21,128:fory=1to100:nexty,x
1085 pokev+21,129:forx=1to200:next:print" and the [154]bass[146] clef[146].
1090 [129]x[178]1[164]3:[151]v[170]21,131:[129]y[178]1[164]500:[130]:[151]v[170]21,129:[129]y[178]1[164]100:[130]y,x
1095 [151]v[170]21,131:[141]4300
1100 [153][166]7)"together they are known as"
1103 [153][163]11)"the printgrandwait contstaffwait."
1105 [129]x[178]1[164]2:[151]v[170]21,128:[129]y[178]1[164]100:[130]:[151]v[170]21,131:[129]y[178]1[164]500:[130]y,x
1110 [141]4300:[153]" each line and space on the grand staff"
1115 [153]" represents a key on the piano"
1120 [151]214,5:[153]:[153]"^";:[151]v[170]21,147
1121 [151]54296,15:[151]54275,0:[151]54274,255:[151]54277,13:[151]54278,0
1122 [151]54273,a(1):[151]54272,b(1):[151]54276,65
1125 [129]x[178]1[164]1100:[130]:[153]"cmd ^";:[151]v[170]9,214:[151]54273,a(2):[151]54272,b(2)
1126 [151]54276,64:[151]54276,65
1130 [129]y[178]1[164]19:[129]x[178]1[164]1100:[130]:[153]"cmd ^";:[151]v[170]9,[194](v[170]9)[171]4
1131 [151]54273,a(y[170]2):[151]54272,b(y[170]2):[151]54276,64:[151]54276,65:[130]
1132 [129]x[178]1[164]1000:[130]:[151]54276,64
1135 [141]4300:[151]v[170]21,131
1140 [153]" the music alphabet is from await to gwait.":[141]4300
1145 [153]" after g it repeats, starting with a."
1150 [153][163]6)"(a b c d e f g a b c . . .)
1155 gosub4300
1160 print"[158] every line and space has a letter name"
1170 printtab(8)"from the music alphabet"
1175 poke214,20:print:printtab(15)"g[145]b[145]d[145]f[145]a[145]c[145]e[145]g[145]b[145]d[145]f"
1180 pokev+8,210:pokev+9,160
1185 poke2044,201:pokev+43,0:pokev+44,11:pokev+45,0:pokev+21,223
1190 gosub4300:pokev+21,255
1195 print"[145][145][154]ga[194]b[194]c[194]d[194]e[194]f[194]g[194]a[194]b[194] [153][194]d[194]e[194]f[194]g[194]a[194]b[194]c[194]d[194]e[194]f"
1200 print"[145][158] the names of the piano keys"
1205 print" match the names on the staff"
1210 gosub4300
1215 print" to help learn the names of the"
1220 print" lines and spaces, remember:":gosub4300
1225 printspc(6)"treble clef spaces, the word:"
1230 printtab(16)"[153]face[146]"
1240 gosub4300
1245 print" treble clef lines, the sentence:"
1250 print" [153]e[146]very g[146]ood b[146]oy d[146]eserves f[146]udge"
1260 gosub4300
1265 print" bass clef spaces, the sentence:"
1270 printtab(11)"[154]a[146]ll c[146]ows e[146]at g[146]rass"
1280 gosub4300
1285 print" bass clef lines, the sentence:"
1290 print" [154]g[146]reat b[146]ig d[146]ogs f[146]ight a[146]nimals"
1295 gosub4300
1300 print" the note c in the middle of the"
1305 print" piano keyboard is called middle[146] c[146].
1310 [151]214,20:[153]:[153][163]15)"contlenonlenonlenonlenonlenononprintlenonlenonlenonlenonlen"
1315 [151]v[170]21,163
1320 [151]214,5:[153]:[153]"oncont(NULL) (NULL)close(NULL)close(NULL)close(NULL)close(NULL)close(NULL)close(NULL)close(NULL)close(NULL)printclose(NULL)close(NULL)close(NULL) (NULL)close(NULL)close(NULL)close(NULL)close(NULL)close(NULL)close(NULL)close"
1325 [141]4300
1330 [153]"sys on the grand staff, middle c is on a"
1335 [153]" special line called a ledgerwait linewait"
1340 [141]4300:[151]v[170]21,0:[137]900
2000 [137]2000
3000 [143] read joystick
3010 [129]t[178]1[164]80:[130]:jv[178][194](56320):fr[178]jv[175]16:jv[178]15[171](jv[175]15):[142]
4000 [142]:[143] help
4200 [143] range selection
4205 [139]l1[178]0[167]n$[178]"input"
4210 [151]214,22:[153]:[139]n$[179][177]"input"[167]4220
4215 l1[178]11:l2[178]11:[153]" f1-printtreblewait f3-contbass f5-printgrand contstaff":[142]
4220 [139]n$[179][177]"dim"[167]4230
4225 l1[178]11:l2[178]1:[153]" f1-printtreblewait f3-contbasswait f5-printgrand contstaff":[142]
4230 l1[178]21:l2[178]1:[153]" f1-printtreblewait f3-contbass f5-printgrandwait contstaffwait":[142]
4250 [143] clear and position cursor
4255 [151]214,6:[153]:[129]x[178]1[164]12:[153]" ";:[130]
4260 [151]214,22:[153]:[153][163]7)" "
4270 [151]214,6:[153]:[153]"";:[142]
4300 [143] instruction continue
4310 [151]214,22:[153]:[153][163]7)"stoppress any key to continue.sys"
4320 [161]a$:[139]a$[178]""[137]4320
4330 [141]4250:[142]
4500 [143] correct answer
4505 [151]54275,10:[151]54274,0:[151]v[170]21,[194](v[170]21)[176]64
4510 [151]54296,15:[151]54273,a(ni):[151]54272,b(ni):[151]54277,15:[151]54278,0
4515 [151]54275,10:[151]54274,0:[151]v[170]21,[194](v[170]21)[176]64
4520 [151]54276,65:[129]x[178]1[164]750:[130]:[151]54276,64:[151]54296,0
4525 [151]v[170]21,[194](v[170]21)[175]191:[142]
4600 [143] wrong answer
4610 [151]54296,15:[151]54277,45:[151]54278,165:[151]54276,65:[151]54273,1
4615 [151]54272,195:[151]54275,5:[151]54274,120
4620 [129]x[178]1[164]300:[130]:[151]54276,32:[151]54273,0:[151]54272,0:[142]
5000 [143] treble clef
5010 [131],12,,,10,,,10,,,10,,,12,,,24,,,56,,,104,,,200,,1,136,,3,62,,6,75,0
5020 [131]12,137,128,12,200,192,12,8,192,6,8,192,3,137,128,,255,,,8,,,40,,,56,0
5025 [143] bass clef
5030 [131]31,,,96,195,,192,99,,240,48,,112,48,,,51,,,51,,,96,,,192,,1,128,,3,,,12
5040 [131],,48,,,192,,,,,,,,,,,,,,,,,,,,,,,0
5045 [143] 4/4
5050 [131],1,192,,3,192,,6,192,,12,192,,31,224,,,192,,1,224,,,,0
5060 [131]1,192,,3,192,,6,192,,12,192,,31,224,,,192,,1,224,,,,0
5070 [131],,,,,,,,,,,,,0
5075 [143] ace
5080 [131],,,,,248,,,192,,,192,,,252,,,,,120,,,204,,,192,,,192,,,192,,,204,0
5090 [131],120,,,,,48,,,120,,,204,,,252,,,204,,,204,,,204,,0
5100 [143] note body
5110 [131],,120,,,252,,1,254,,1,254,,1,254,,,252,,,120,0
5120 [131],,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,0
5125 [143] letter c
5130 [131]120,,,204,,,192,,,192,,,192,,,204,,,120,,0
5140 [131],,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,0
5145 [143] clown
5150 [131],16,,,84,,1,85,,5,85,64,62,170,240,254,34,252,62,154,240,10,154,128
5160 [131]9,169,128,8,84,128,9,1,128,1,85,,63,171,240,63,207,240,63,19,240,,16,,,,
5170 [131],,,,,,,,,,,0
5175 [143] middle c
5180 [131]255,240,,255,240,,255,240,,255,240,,255,240,,255,240,,255,240,,255,240
5185 [131]0
5190 [131]255,254,,255,254,,255,254,,255,254,,255,254,,255,254,,255,254,,255,254
5195 [131],,,,,,,,,,,,,,,0
5200 [143] egb
5210 [131],,,,,,,,248,,,204,,,204,,,248,,,204,,,204,,,248,,,,,120,,,204,,,192
5215 [131],,220,,,204,,,204,,,120,,,,,252,,,192,,,192,,0
5220 [143] dfa
5225 [131],,204,,,252,,,204,,,204,,,204,,,,,252,,,192,,,192,,,248,,,192,,,192
5230 [131],,192,,,,,240,,,216,,,204,,,204,,,204,,,216,,,240,,0
5235 [143] ace
5240 [131],,,,,,,,,,3,240,,3,,,3,,,3,224,,3,,,3,,,3,240,,,,1,224,,3,48,,3,,,3
5245 [131],,3,,,3,48,,1,224,,,,,96,,,240,,0
6000 [143] note values
6010 [131]12,143,14,24,15,210,16,195,18,209,21,31,22,96,25,30,28,49,31,165,33,135
6020 [131]37,162,42,62,44,193,50,60,56,99,63,75,67,15,75,69,84,125,89,131